package com.yang.booking.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yang.booking.pojo.ShiftManagement;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;


@Repository
public interface ShiftManagementMapper extends BaseMapper<ShiftManagement> {

    @Select("select sm.* from shift_management sm inner join staff_scheduling ss on sm.id = ss.shift_management_id where ss.staff_id = #{staffId} and ss.biweekly_id = #{biweeklyId}")
    ShiftManagement queryStaffBiweeklyShift(@Param(value = "staffId") String staffId, @Param(value = "biweeklyId") String biweeklyId);

}
